Field of the Invention
The present invention relates to a communication system which performs communication between a server outside a LAN and devices inside the LAN, and its relevant technique.
Description of the Background Art
There is a technique for ensuring cooperation between a server (a cloud server or the like) outside a LAN and devices (an image forming apparatus and the like) inside the LAN.
There is, for example, a technique for printing out an electronic document stored in a server on a cloud (a cloud server) by using an image forming apparatus on a local side (inside a LAN) (see Japanese Patent Application Laid Open Gazette No. 2013-73578 (Patent Document 1)).
In Patent Document 1, disclosed is a document output system (communication system) which comprises an image forming apparatus (device), a gateway, and a cloud server. In the system, an electronic document stored in the cloud server is sent to the image forming apparatus through the gateway and the like and printed out in the image forming apparatus 10. Further, the gateway and the image forming apparatus (device) are provided inside a LAN and the cloud server is provided outside the LAN.
In such a system as above, usually, a fire wall is provided between the image forming apparatus (device) inside the LAN and the cloud server outside the LAN.
Access from the image forming apparatus inside the LAN to the cloud server outside the LAN passes through the fire wall and is allowed.
Reverse access, i.e., direct access from the cloud server outside the LAN to the image forming apparatus inside the LAN, however, is blocked by the fire wall. In other words, the cloud server cannot directly access the image forming apparatus.
In contrast to this, there is a possible technique in which a message session (communication session) (as an exception to a fire wall) is established between a management server outside a LAN and a gateway (communication relay apparatus) inside the LAN and then access is made from the cloud server outside the LAN to the image forming apparatus inside the LAN via the management server and the gateway.
FIGS. 19 and 20 show such a technique as above. At start up or the like, gateways 30 (30a, 30b) establish message sessions (511, 512) with a management server 50 which is specified in advance (see thick lines in FIG. 19). After that, as shown in FIG. 20, when a cloud server 70 issues an access request for a specific device 10d, by using the message session (e.g., 511) between the management server 50 and one gateway 30 (e.g., 30a), the management server 50 sends a tunnel connection request to the gateway 30a. On the basis of the tunnel connection request, the gateway 30a establishes a tunnel communication with the cloud server 70. Then, by using the tunnel communication, the cloud server 70 makes access to the device (image forming apparatus) 10d (via the gateway 30). This technique will be described later in detail.
Further, the similar technique is disclosed in Japanese Patent Application Laid Open Gazette No. 2014-215846 (Patent Document 2).
In the above system, a plurality of gateways are provided inside the LAN. Each of the plurality of gateways relays communication between a device which is a management target thereof and the cloud server.
It can be thought that the plurality of gateways each determine its management target device, for example, as follows. Specifically, each of the gateways in the same network determines a device which is uniquely selected among the plurality of devices in the network, as a management target device thereof.
When each gateway uniquely determines the management target device thereof as above, however, there is a probability that a device may be selected duplicately by a plurality of gateways as the management target device thereof. For example, there arises a case where one gateway determines four devices 203, 204, 205, and 206 as management target devices thereof and another gateway also determines four devices 203, 204, 205, and 206 as management target devices thereof. In such a case, these two gateways have absolutely the same four devices as the management target devices thereof and there occurs great duplication. In other words, there occurs a great waste.